package com.example.schedule;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;

@EnableScheduling
@Configuration
public class scheduledTask {

    /**
     * 直接通过注解的方式执行定时任务
     */

//    @Scheduled(cron = "0/5 * * * * ?")
//    public void sayTime(){
//        System.out.println(new Date());
//    }

}
